package lt.hsu.service;

import jakarta.validation.constraints.NotBlank;
import lt.hsu.req.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "USER-SERVICE") // 指定要调用的远程服务的名称
@RequestMapping("remote")
public interface RemoteUser {

    @PostMapping("/user/findUser")
    UserInfo findUser(@NotBlank(message = "用户名不能为空") @RequestParam("username") String username);

}
